package com.siao.example.libaray.mvc.ui
{
	import com.siao.component.IDataItem;
	import com.siao.component.ISelectItem;
	import com.siao.display.LayoutElement;
	
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFormatAlign;
	
	/**
	 * MVC阻塞选择项目
	 * @author SiaoLeon
	 */
	public class BlockComboItem extends LayoutElement implements IDataItem, ISelectItem
	{
		// -------------------------------------------------------------------------------------------------------- 静态常量
		
		// -------------------------------------------------------------------------------------------------------- 静态变量
		
		// -------------------------------------------------------------------------------------------------------- 静态方法
		
		// -------------------------------------------------------------------------------------------------------- 静态函数
		
		// -------------------------------------------------------------------------------------------------------- 属性
		
		public function get data():*
		{
			return this.txtLabel.text;
		}
		
		public function set data(value:*):void
		{
			this.txtLabel.text = value;
		}
		
		private var _selected:Boolean;
		
		public function get selected():Boolean
		{
			return this._selected;
		}
		
		public function set selected(value:Boolean):void
		{
			this._selected = value;
		}
		
		// -------------------------------------------------------------------------------------------------------- 变量
		
		private var txtLabel:TextField;
		
		// -------------------------------------------------------------------------------------------------------- 构造
		
		/**
		 * 构造函数
		 */
		public function BlockComboItem()
		{
			super();
			
			this.txtLabel = new TextField();
			this.txtLabel.defaultTextFormat = new TextFormat("simsun", 12, 0X000000, null, null, null, null, null, TextFormatAlign.CENTER);
			this.txtLabel.selectable = false;
			this.txtLabel.x = 0;
			this.txtLabel.y = 2;
			this.txtLabel.width = 40;
			this.txtLabel.height = 16;
			this.addChild(this.txtLabel);
			
			this.width = 40;
			this.height = 20;
			this.draw(0XFF0000, 0.5);
		}
	
		// -------------------------------------------------------------------------------------------------------- 方法
	
		// -------------------------------------------------------------------------------------------------------- 函数
	
	}
}
